Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deployment: Changes for keystone #14837

Merged
merged 18 commits into from
Nov 8, 2024
Merged

deployment: Changes for keystone #14837

merged 18 commits into from
Nov 8, 2024

Conversation

archseer
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Oct 21, 2024

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@archseer archseer force-pushed the aptos-deployments branch 5 times, most recently from 9d56a91 to 898fd46 Compare October 22, 2024 07:45
@archseer archseer requested a review from krehermann October 22, 2024 08:01
require.NoError(t, err)
// sepoliaArbitrumChainSel, err := chainsel.SelectorFromChainId(sepoliaArbitrumChainId)
// require.NoError(t, err)
// aptosChainSel := uint64(999) // TODO:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently disabled because non-EVMs aren't listed in chain-selectors yet

Comment on lines 158 to 171
switch family {
case chainsel.FamilyEVM:
ocrtype = chaintype.EVM
case chainsel.FamilySolana:
ocrtype = chaintype.Solana
case chainsel.FamilyStarknet:
ocrtype = chaintype.StarkNet
case chainsel.FamilyCosmos:
ocrtype = chaintype.Cosmos
case chainsel.FamilyAptos:
ocrtype = chaintype.Aptos
default:
panic(fmt.Sprintf("Unsupported chain family %v", family))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a bunch of these type conversions but I'm not sure where to put the helper functions

@@ -45,6 +45,20 @@ query FetchAccounts {
}
}

query FetchKeys {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this in this change? all of the data should be coming from the JD right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is used by node-operations create-ccip-chain (which can be used for keystone too) when it's generating ChainConfig for the nodes (which is then exposed by JD) -- take a look at CreateCCIPOCRSupportedChains

@@ -164,41 +163,40 @@ func makeNodeKeysSlice(nodes []*ocr2Node) []NodeKeys {
// in is in a convenient form to handle the CLO representation of the nop data
type DonCapabilities struct {
Name string
Nops []*models.NodeOperator // each nop is a node operator and may have multiple nodes
Nodes []string
Copy link
Contributor

@krehermann krehermann Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be p2pkey. it may be more awkward wrt to the JD api, but it makes the definition independent of jd instance b/c it doesn't leak jd-instance-specific state

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we able to query by p2pkey on the ListNodes API?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't know, we could request it a feature.

at worst we list all the nodes in jd and filter them locally until they give us a better api

@archseer archseer force-pushed the aptos-deployments branch 5 times, most recently from f65cf81 to 786390a Compare October 30, 2024 02:33
krehermann
krehermann previously approved these changes Oct 30, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Flaky Test Detector for deployment/go.mod project has failed ❌

Ran new or updated tests between develop and 0d9c915 (aptos-deployments).

View Flaky Detector Details | Compare Changes

Failed Tests

Ran 7 tests in total for all affected test packages. Below are the tests identified as flaky, with a pass ratio lower than the 100% threshold:

TestPackage                                                TestName       PassRatio  RunCount   Skipped
---------                                                  ---------      ---------  ---------  ---------
github.com/smartcontractkit/chainlink/deployment/keystone  TestDeployCLO  0%         1          false

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Flaky Test Detector for deployment/go.mod project has failed ❌

Ran new or updated tests between develop and a2d4640 (aptos-deployments).

View Flaky Detector Details | Compare Changes

Failed Tests

Ran 7 tests in total for all affected test packages. Below are the tests identified as flaky, with a pass ratio lower than the 100% threshold:

TestPackage                                                TestName       PassRatio  RunCount   Skipped
---------                                                  ---------      ---------  ---------  ---------
github.com/smartcontractkit/chainlink/deployment/keystone  TestDeployCLO  0%         1          false

@archseer archseer requested a review from a team as a code owner November 5, 2024 07:14
Copy link
Contributor

github-actions bot commented Nov 5, 2024

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

🎖️ No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these.

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Flaky Test Detector for deployment/go.mod project has failed ❌

Ran new or updated tests between develop and 8f58772 (aptos-deployments).

View Flaky Detector Details | Compare Changes

Failed Tests

Ran 7 tests in total for all affected test packages. Below are the tests identified as flaky, with a pass ratio lower than the 100% threshold:

TestPackage                                                TestName       PassRatio  RunCount   Skipped
---------                                                  ---------      ---------  ---------  ---------
github.com/smartcontractkit/chainlink/deployment/keystone  TestDeployCLO  0%         1          false

krehermann
krehermann previously approved these changes Nov 5, 2024
@archseer archseer enabled auto-merge November 5, 2024 13:59
@@ -29,6 +29,18 @@ type MemoryEnvironmentConfig struct {
RegistryConfig deployment.CapabilityRegistryConfig
}

// For placeholders like aptos
func NewMemoryChain(t *testing.T, selector uint64) deployment.Chain {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note TODO here regarding the thinking for non-evms

// TODO: Add SolChains, AptosChain etc.
. Fine if we intend to come back to it, but intention is we'd add some aptos go sdk based Chain there (will require bumping geth to 1.14, which I'm working on with @jmank88)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up not even using this in the tests since chain-selectors doesn't support non-EVMs, but most other chains don't have a simulated backend. We'd need to start a local node and test against that. For Keystone tests at the moment we don't actually need a fully configured node, just an instance of the node with the Aptos keys available so we can configure the contracts.

Copy link
Contributor

@connorwstein connorwstein Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chain-selectors fully was intended to support non-evms, should be fixed soon.

but most other chains don't have a simulated backend. We'd need to start a local node and test against that.

The onchain interface isn't tied to a simulated backend. The intention there is to use the docker based environment for families where that doesn't exist. The AptosOnchainClient or w/e interface would just have an implementation only in the devenv not memory

Capabilities []kcr.CapabilitiesRegistryCapability // every capability is hosted on each node
}

type Node struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks product agnostic - should be able to combine/merge with

type Node struct {
?

ChainConfigs []*nodev1.ChainConfig
}

func NodesFromJD(name string, nodeIDs []string, jd deployment.OffchainClient) ([]Node, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto here should be a way to either combine with or have another helper alongside

func NodeInfo(nodeIDs []string, oc NodeChainConfigsLister) (Nodes, error) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in there was very CCIP specific, only supporting EVM which needs a larger cleanup. Keystone also uses peer IDs for node IDs so our lookup differs. I'd prefer to leave a TODO here and fix this in a follow up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see it only support EVM at the moment, but what part is CCIP specific?

@archseer archseer added this pull request to the merge queue Nov 8, 2024
Merged via the queue into develop with commit 5db63e7 Nov 8, 2024
143 of 144 checks passed
@archseer archseer deleted the aptos-deployments branch November 8, 2024 15:15
bolekk added a commit that referenced this pull request Nov 8, 2024
github-merge-queue bot pushed a commit that referenced this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants